home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 168
/
168.d81
/
lunar eclipses
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
144 lines
5 poke55,.:poke56,56:clr
6 dv=peek(186):ifdv<8thendv=8
7 poke53280,.:poke53281,.:print"[147]"
8 poke53371,.
9 poke53272,31
10 ad=49152
15 sysad:sysad+12
25 print"[147]":sysad+9,0
30 printtab(6)"[154][204][213][206][193][210] [197][195][204][201][208][211][197] [208][210][197][196][201][195][212][207][210]"
35 r1=(NULL)/180:u=0
40 printtab(11)"[153][217]ear: ";:l9%=4:gosub510:y=q9
45 g=1:ify<1583theng=0
50 print
55 k0=int((y-1900)*12.3685)
60 t=(y-1899.5)/100
65 t2=t*t:t3=t*t*t
70 j0=2415020+29*k0
75 f0=.0001178*t2-.000000155*t3
80 f0=f0+.75933+.53058868*k0
85 f0=f0-.000837*t-.000335*t2
90 j0=j0+int(f0):f0=f0-int(f0)
95 m0=k0*.08084821133
100 m0=360*(m0-int(m0))+359.2242
105 m0=m0-.0000333*t2
110 m0=m0-.00000347*t3
115 m1=k0*.07171366128
120 m1=360*(m1-int(m1))+306.0253
125 m1=m1+.0107306*t2
130 m1=m1+.00001236*t3
135 b1=k0*.08519585128
140 b1=360*(b1-int(b1))+21.2964
145 b1=b1-.0016528*t2
150 b1=b1-.00000239*t3
155 fork9=1to27step 2
160 j=j0+14*k9:f=f0+.765294*k9
165 k=k9/2
170 m5=(m0+k*29.10535608)*r1
175 m6=(m1+k*385.81691806)*r1
180 b6=(b1+k*390.67050646)*r1
185 f=f-.4068*sin(m6)
190 f=f+(.1734-.000393*t)*sin(m5)
195 f=f+.0161*sin(2*m6)
200 f=f-.0104*sin(2*b6)
205 f=f-.0074*sin(m5-m6)
210 f=f-.0051*sin(m5+m6)
215 f=f+.0021*sin(2*m5)
220 f=f+.5/1440
225 j=j+int(f):f=f-int(f)
230 gosub260
235 next
240 gosub30000
250 poke198,.:goto25
260 rem lunar eclipse subroutine
265 d7=0
270 ifabs(sin(b6))>.36then505
275 s=5.19595-.0048*cos(m5)
280 s=s+.0020*cos(2*m5)
285 s=s-.3283*cos(m6)
290 s=s-.0060*cos(m5+m6)
295 s=s+.0041*cos(m5-m6)
300 c1=.2070*sin(m5)
305 c1=c1+.0024*sin(2*m5)
310 c1=c1-.0390*sin(m6)
315 c1=c1+.0115*sin(2*m6)
320 c1=c1-.0073*sin(m5+m6)
325 c1=c1-.0067*sin(m5-m6)
330 c1=c1+.0117*sin(2*b6)
335 d9=abs(s*sin(b6)+c1*cos(b6))
340 u=.0059+.0046*cos(m5)
345 u=u-.0182*cos(m6)
350 u=u+.0004*cos(2*m6)
355 u=u-.0005*cos(m5+m6)
360 rp=1.2847+u:ru=.7404-u
365 mp=(1.5572+u-d9)/.545
370 ifmp<0then505
375 mu=(1.0129-u-d9)/.545
380 d5=1.5572+u:d6=1.0129-u
385 d7=.4679-u
390 n=(.5458+.04*cos(m6))/60
395 d5=sqr(d5*d5-d9*d9)/n
400 ifmu<=0then420
405 d6=sqr(d6*d6-d9*d9)/n
410 ifmu<=1then420
415 d7=sqr(d7*d7-d9*d9)/n
420 gosub555
422 sysad+9,1
425 print"[158][196]ate: [146]";y;m;d1
430 print"[153][205]ax-phase: ";
435 printh1;":";m9;"[153][213][212]"
440 mp=int(1000*mp+.5)/1000
445 print"[159][208]enumbral mag: ";mp
450 ifmu<=0thenprint:goto465
455 mu=int(1000*mu+.5)/1000
460 print"[159][213]mbral mag: ";mu
465 printtab(23)"[158][145][145][145][145]-[211]emidurations-[146]"
470 d5=int(d5+.5):rem round off
475 printtab(22)"[155][208]enumbra:";d5;"[155]min"
480 ifmu<0then500
485 d6=int(d6+.5):d7=int(d7+.5)
490 printtab(22)"[152][213]mbra:";d6;"[152]min"
495 printtab(22)"[150][212][207][212][193][204][201][212][217]:";d7;"[150]min":goto505
500 print:print
505 return
510 q9$="":poke198,.
512 geta$
514 poke646,rnd(1)*15+1:print"*[157]";:ifa$=""then512
516 ifa$=chr$(13)thenprint" ":q9=val(q9$):return
518 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto530
520 iflen(q9$)>=l9%thensysad+9,2:goto512
522 if(a$>="0"anda$<="9")ora$="."ora$="-"then526
524 goto512
526 q9$=q9$+a$
528 print""a$;:sysad+9,6:goto512
530 print" [157][157] [157]";:goto512
555 rem julian calendar
560 f=f+.5
565 iff<1then575
570 f=f-1:j=j+1
575 ifg=1then585
580 a=j:goto595
585 a1=int((j/36524.25)-51.12264)
590 a=j+1+a1-int(a1/4)
595 b=a+1524
600 c=int((b/365.25)-.3343)
605 d=int(365.25*c)
610 e=int((b-d)/30.61)
615 d=b-d-int(30.61*e)+f
620 m=e-1:y=c-4716
625 ife>13.5thenm=m-12
630 ifm<2.5theny=y+1
635 d1=int(d):h=24*(d-d1)
640 h1=int(h):m9=int(60*(h-h1))
645 return
10000 d=peek(186):n$="lunar eclipses":open15,d,15,"s0:"+n$:close15:saven$,d:end
30000 poke214,21:print:printtab(8)"[159](1[159]) [212]ry another one
30010 [153][163]8)"open(2open) (NULL)o (NULL)(NULL)right$(NULL)val(NULL)(NULL)val (NULL)enu"
30020 [158]ad[170]9,15:[151]198,0
30030 [161]a$:[139]a$[179]"1"[176]a$[177]"2"[167]30030
30040 [139]a$[178]"1"[167][142]
30050 [158]ad[170]15
30060 [153]"loadstopload"[199](34)"b.universe ii"[199](34)","dv
30070 [153]"run28"
30080 [151]631,13:[151]632,13:[151]198,2:[128]